fn add(x: i32, y: i32) -> i32 {
    let z = x + y;
    z
}

fn chang_i32(mut x: i32) -> i32 {
    x = x + 4;
    println!("change_i32:{}", x);
    x
}

fn modify_i32<'a>(x: &'a mut i32) {
    *x += 4;
}

fn main() {
    let x = 5;
    let y = 10;
    let z = add(x, y);
    println!("x:{},y:{},z:{}", x, y, z);

    // 形参，不改变原有值
    let change_x = 5;
    chang_i32(change_x);
    println!("change_x:{}", change_x);

    // 改变了原有值
    let mut modify_x = 5;
    modify_i32(&mut modify_x);
    println!("modify_x:{}", modify_x);

    


    // println!("123")
}
